import { attrDefine } from "./attr_define";
import { LimbsTypeDefine } from "./people_limbs";

export const genderDefine = {
	male: 'Male',
	female: 'Female'
}

// 人类种族
export const humanRace = {
	key: "human",
	text: "人类",
	desc: "天灵界种族之一，能力平衡。",
	gender: {
		[genderDefine.male]: "男",
		[genderDefine.female]: "女",
	},
	limbs: [
		{ key: LimbsTypeDefine.head.key, equipNum: 1, power: .5 },
		{ key: LimbsTypeDefine.body.key, equipNum: 2, power: 1 },
		{ key: LimbsTypeDefine.finger.key, equipNum: 10, power: 1 },
		{ key: LimbsTypeDefine.hand.key, text: '左手', equipNum: 2, power: .8 },
		{ key: LimbsTypeDefine.hand.key, text: '右手', equipNum: 2, power: 1.1 },
		{ key: LimbsTypeDefine.foot.key, text: '左脚', equipNum: 1, power: 1.1 },
		{ key: LimbsTypeDefine.foot.key, text: '右脚', equipNum: 1, power: 1.2 },
	],
	attr: {
		blood: 10,
		agile: 6,
		spirit: 0,
		cons: 10,
		ageMax: 60,
	},
	skills: [
		'基本技能/肉体攻击'
	],
  transform: (basicAttr, attr) => {
  }
};

// 妖族
export const demonRace = {
	key: "demon",
	text: "妖族",
	desc: "天灵界种族之一，抗揍能打，但是法力能力较弱。",
	gender: {
		[genderDefine.male]: "雄",
		[genderDefine.female]: "雌",
	},
	limbs: [
		{ key: LimbsTypeDefine.head.key, equipNum: 1, power: 1 },
		{ key: LimbsTypeDefine.body.key, equipNum: 2, power: 1 },
		{ key: LimbsTypeDefine.animalClaw.key, text: '左兽爪', equipNum: 1, power: 1 },
		{ key: LimbsTypeDefine.animalClaw.key, text: '右兽爪', equipNum: 1, power: 1 },
		{ key: LimbsTypeDefine.animalFoot.key, text: '左兽足', equipNum: 1, power: 1.2 },
		{ key: LimbsTypeDefine.animalFoot.key, text: '右兽足', equipNum: 1, power: 1.2 },
	],
	attr: {
		blood: 20,
		agile: 10,
		spirit: 0,
		cons: 1,
		ageMax: 100,
	},
	skills: [
		'基本技能/肉体攻击'
	],
  transform: (basicAttr, attr) => {
    attr[attrDefine.bloodAtk.key] = basicAttr[attrDefine.blood.key] * 1;
    attr[attrDefine.bloodDef.key] = basicAttr[attrDefine.blood.key] * .5;
    attr.hpMax = basicAttr.blood * 8;
    attr.atkSpeed = (basicAttr.agile) * .8;
  }
};

export const RaceDefine = {
	human: humanRace,
	demon: demonRace
}